let ZhuojiGameConstant = {};

/*所成牌型*/
ZhuojiGameConstant.HU_TYPE_PING_HU = 0x1;               //平胡
ZhuojiGameConstant.HU_TYPE_DA_DUI_ZI = 0x2;             //大对子，碰碰胡
ZhuojiGameConstant.HU_TYPE_7_DUI = 0x4;                 //七对
ZhuojiGameConstant.HU_TYPE_LONG_7_DUI = 0x8;            //龙七对
ZhuojiGameConstant.HU_TYPE_QING_YI_SE = 0x10;           //清一色
ZhuojiGameConstant.HU_TYPE_QING_DA_DUI = 0x20;          //清大对
ZhuojiGameConstant.HU_TYPE_QING_DAN_DIAO = 0x40;        //清单吊
ZhuojiGameConstant.HU_TYPE_QING_7_DUI = 0x80;           //清七对
ZhuojiGameConstant.HU_TYPE_QING_LONG_BEI = 0x100;       //清龙背
ZhuojiGameConstant.HU_TYPE_DAN_DIAO = 0x200;            //单吊

/*额外牌型*/
ZhuojiGameConstant.MAHJONG_HU_CODE_TING_YING_BAO =  0x1000;
ZhuojiGameConstant.MAHJONG_HU_CODE_TING_RUAN_BAO =  0x2000;
ZhuojiGameConstant.MAHJONG_HU_CODE_SHA_BAO =        0x4000;
ZhuojiGameConstant.MAHJONG_HU_CODE_MING_GANG_MO =   0x8000;
ZhuojiGameConstant.MAHJONG_HU_CODE_AN_GANG_MO =     0x10000;
ZhuojiGameConstant.MAHJONG_HU_CODE_BU_GANG_MO =     0x20000;
ZhuojiGameConstant.MAHJONG_HU_CODE_MING_GANG_PAO =  0x40000;
ZhuojiGameConstant.MAHJONG_HU_CODE_AN_GANG_PAO =    0x80000;
ZhuojiGameConstant.MAHJONG_HU_CODE_BU_GANG_PAO =    0x100000;
ZhuojiGameConstant.MAHJONG_HU_CODE_QIANG_GANG_HU =  0x200000;

/*麻将花色掩码*/
ZhuojiGameConstant.MAHJONG_CODE_COLOR_WAN = 0x00;       //万
ZhuojiGameConstant.MAHJONG_CODE_COLOR_TIAO = 0x10;      //条
ZhuojiGameConstant.MAHJONG_CODE_COLOR_TONG = 0x20;      //筒


/*玩法类型*/
ZhuojiGameConstant.PLAY_TYPE_LIAN_ZHANG = 1;            //连庄
ZhuojiGameConstant.PLAY_TYPE_YANG_YANG_SAN = 2;         //样样三

/*桌子state*/
ZhuojiGameConstant.TABLE_STATE_INVALID = -1;
ZhuojiGameConstant.TABLE_STATE_WAITING_PLAYER = 0;
ZhuojiGameConstant.TABLE_STATE_PLAYING = 1;

/*桌子sub state*/
ZhuojiGameConstant.GAME_TABLE_SUB_STATE_WAITING_CLIENT_SHOW_INIT_CARDS = 10;//开始发牌
ZhuojiGameConstant.GAME_TABLE_SUB_STATE_IDLE = 11;                          //等待玩家出牌
ZhuojiGameConstant.GAME_TABLE_SUB_STATE_AUTO_MO_CARD = 12;                  //自动出牌
ZhuojiGameConstant.GAME_TABLE_SUB_STATE_SHOW_GAME_OVER_SCREEN = 13;         //牌局结束


/*操作类型*/
ZhuojiGameConstant.MAHJONG_OPERTAION_CHI = 0x1;            //吃
ZhuojiGameConstant.MAHJONG_OPERTAION_PENG = 0x2;           //碰
ZhuojiGameConstant.MAHJONG_OPERTAION_GANG = 0x4;           //杠
ZhuojiGameConstant.MAHJONG_OPERTAION_TING_CHU = 0x8;        //听牌后的出牌
ZhuojiGameConstant.MAHJONG_OPERTAION_CHU = 0x10;            //出牌
ZhuojiGameConstant.MAHJONG_OPERTAION_HU = 0x20;             //胡牌
ZhuojiGameConstant.MAHJONG_OPERTAION_TING = 0x40;           //听
ZhuojiGameConstant.MAHJONG_OPERTAION_CANCEL = 0x80;         //取消
/*操作类型*/
ZhuojiGameConstant.MAHJONG_OPERTAION_AN_GANG = 0x100;        //暗杠
ZhuojiGameConstant.MAHJONG_OPERTAION_MING_GANG = 0x200;      //明杠
ZhuojiGameConstant.MAHJONG_OPERTAION_BU_GANG = 0x400;        //补杠


/*玩家结局类型*/
ZhuojiGameConstant.PLAYER_RESULT_TYPE_CHA_JIAO = 0x01;       //查叫
ZhuojiGameConstant.PLAYER_RESULT_TYPE_TING = 0x02;           //听牌
ZhuojiGameConstant.PLAYER_RESULT_TYPE_HU = 0x03;             //胡
ZhuojiGameConstant.PLAYER_RESULT_TYPE_ZI_MO = 0x04;          //自摸

/*牌局结局类型*/
ZhuojiGameConstant.GAME_RESULT_TYPE_LIU_JU = 0x01;             //流局
ZhuojiGameConstant.GAME_RESULT_TYPE_DIAN_PAO = 0x02;           //点炮
ZhuojiGameConstant.GAME_RESULT_TYPE_ZI_MO = 0x03;              //自摸

/*鸡牌类型*/
ZhuojiGameConstant.JI_TYPE_YAOJI = 1;
ZhuojiGameConstant.JI_TYPE_WUGUJI = 2;
ZhuojiGameConstant.JI_TYPE_YAOJI_CHONG_FENG = 3;
ZhuojiGameConstant.JI_TYPE_YAOJI_ZEREN = 4;
ZhuojiGameConstant.JI_TYPE_WUGU_CHONG_FENG = 5;
ZhuojiGameConstant.JI_TYPE_WUGU_ZEREN = 6;
ZhuojiGameConstant.JI_TYPE_YAOBAI = 7;
ZhuojiGameConstant.JI_TYPE_BENJI = 8;
ZhuojiGameConstant.JI_TYPE_XINGQI = 9;
ZhuojiGameConstant.JI_TYPE_FANPAI = 10;
ZhuojiGameConstant.JI_TYPE_CHUIFENG = 11;

/*牌局中上一次操作类型*/
ZhuojiGameConstant.ACTION_MING_GANG = 1;
ZhuojiGameConstant.ACTION_AN_GANG = 2;
ZhuojiGameConstant.ACTION_BU_GANG = 3;
ZhuojiGameConstant.ACTION_MING_GANG_CHU = 4;
ZhuojiGameConstant.ACTION_AN_GANG_CHU = 5;
ZhuojiGameConstant.ACTION_BU_GANG_CHU = 6;
ZhuojiGameConstant.ACTION_CHU = 7;
ZhuojiGameConstant.ACTION_PENG = 8;


module.exports = ZhuojiGameConstant;
